package com.nl.pulsardemo.pool.config.produce;

import org.apache.commons.pool2.impl.GenericObjectPoolConfig;

/**
 * @author : ZhaoY
 * @description : Produce连接池属性配置
 * @date : 2021-01-31 16:59
 **/
public class MyProducerPoolConfig extends GenericObjectPoolConfig {
    private int maxTotal = 8;//链接池中最大连接数,默认为8.
    private int maxIdle = 8;//链接池中最大空闲的连接数,默认为8.
    private int minIdle = 0;// 连接池中最少空闲的连接数,默认为0.

    public MyProducerPoolConfig() {
    }

    public int getMaxTotal() {
        return this.maxTotal;
    }

    public void setMaxTotal(int maxTotal) {
        this.maxTotal = maxTotal;
    }

    public int getMaxIdle() {
        return this.maxIdle;
    }

    public void setMaxIdle(int maxIdle) {
        this.maxIdle = maxIdle;
    }

    public int getMinIdle() {
        return this.minIdle;
    }

    public void setMinIdle(int minIdle) {
        this.minIdle = minIdle;
    }

    public MyProducerPoolConfig clone() {
        return (MyProducerPoolConfig) super.clone();
    }

}
